package org.ssp.test;

import org.ssp.pojo.KefuObj;
import org.ssp.pojo.Token;
import org.ssp.util.CommonUtil;
import org.ssp.util.KFSessionUtil;

import net.sf.json.JSONObject;

/**
 * 多客服
 * @author susp
 *
 */
public class CustomerService {
	public static void main(String[] args) throws Exception {
		Token token = CommonUtil.getAccessToken("wxf34da76143f5050d", "7a6df503a9afaa70601d652cfb99b16d");

		KefuObj kefu=new KefuObj();
		kefu.setKf_account("test1@gh_74ac440f742a");
		kefu.setNickname("客服1");
//		kefu.setPassword("96e79218965eb72c92a549dd5a330112");
		//java对象转换成json字符串
		String json=JSONObject.fromObject(kefu).toString();
		System.out.println(json);
		System.out.println("创建客服人员："+KFSessionUtil.CretaeKeFu(token.getAccessToken(), json));
		//获取access_token
		String str=KFSessionUtil.getKefuInfo(token.getAccessToken());
		System.out.println(str);
	}

}
